import { Component } from 'react'
import { View, Text, Input } from '@tarojs/components'
import './index.less'
import Taro from '@tarojs/taro'

export default class Index extends Component {

  componentWillMount () { }

  componentDidMount () { }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }
  handleClick() {
    Taro.navigateTo({
      url: '/pages/webview/index?id=1'
    })
    // Taro.scanCode({
    //   scanType: ['qrCode'],
    //   success: (res) => {
    //     Taro.showToast({
    //       title: JSON.stringify(res),
    //       icon: 'success',
    //       duration: 2000
    //     })
    //   }
    // })
  }
  render () {
    return (
      <View className='index'>
        <View className='ss'></View>
        <Text className='dd' onClick={this.handleClick}>点我扫一扫</Text>
        <Input
          type='text' placeholder='将会获取焦点'
          focus
        />

      </View>
    )
  }
}
